<?php
$num_rules = 10000; //default
if($_GET['num_rules'])
	$num_rules = $_GET['num_rules'];
	
$group_size = $num_rules; //default
if($_GET['group_size'])
	$group_size = $_GET['group_size'];

$tests_per_rule = 1; //default
if($_GET['tests'])
	$tests_per_rule = $_GET['tests'];

echo "
?- 	writeln('testing'), <br />
	cputime(T0), <br /><br />

	(basics:for(_,1," . $tests_per_rule . "), <br />";


$j = 1;
for($i = 1; $i <= $num_rules; $i++) {
	echo 'p(a' . $j . ',b' . $i . '), <br />';
	if($i % $group_size == 0) $j++;
}

echo "fail <br />
; <br />
true), <br />
<br />
	cputime(T1), <br />
	T is (T1 - T0), <br />
	writeln('time '=T).";

?>